<!DOCTYPE html>
{% load static %}
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <link rel="icon" type="image/png" sizes="144x144" href="{% static 'img/logo.png' %}"/>
    <link href="{% static  'bootsrap/css/bootstrap.min.css' %}" rel="stylesheet">

    <title>
        {% block title %}

        {% endblock %}
    </title>
</head>
<body>

{#导航栏开始#}
<nav class="navbar navbar-expand-lg navbar-light bg-light">
    <div class="container-fluid">
        <a class="navbar-brand" href="#">
            <img src="{% static 'img/logo.png' %}" alt="" width="40" height="40">
        </a>
        <a class="navbar-brand" href="#">喀什大学 <small>图书馆座位预约系统</small></a>
        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent"
                aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="navbarSupportedContent">
            <ul class="navbar-nav me-auto mb-2 mb-lg-0">
                <li class="nav-item">
                    <a class="nav-link {% block index_active %} {% endblock %}" aria-current="page" href="/">首页</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link {% block index_bookings %} {% endblock %}" href="{% url 'Bookings' %}">预定座位</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link {% block recording_active %} {% endblock %}"
                       href="{% url 'recording' %}">预约记录</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link {% block warn_active %} {% endblock %}" href="{% url 'warn' %}">警告记录</a>
                </li>
            </ul>
            <ul class="navbar-nav  d-flex dropdown" style="--bs-scroll-height: 100px;margin-right: 30px">
                {% if request.session.name %}
                    <a class="nav-link dropdown-toggle" href="#" id="navbarScrollingDropdown" role="button"
                       data-bs-toggle="dropdown" aria-expanded="false">
                        {{ request.session.name.name }}
                        <img style="border-radius: 50%" src="/media/{{ request.session.name.photo }}" alt="" width="40"
                             height="40">
                    </a>

                    <ul class="dropdown-menu" aria-labelledby="navbarScrollingDropdown">

                        <li><a class="dropdown-item" href="{% url 'pswd_update' %}">修改密码</a></li>
                        <li><a class="dropdown-item" href="{% url 'logout' %}">退出登录</a></li>
                    </ul>
                {% else %}
                    <a class=" btn btn-outline-secondary" href="{% url 'login' %}">
                        登录/注册
                    </a>
                {% endif %}


            </ul>


        </div>


    </div>
</nav>
{#导航栏结束#}


{% block index %}

{% endblock %}



{#footer#}
<footer class="d-flex flex-wrap justify-content-between align-items-center py-3   border-top fixed-bottom">
    <p class="col-md-4 mb-0 text-muted">&emsp;© 2022 喀什大学图书馆</p>

    <a href="/"
       class="col-md-4 d-flex align-items-center justify-content-center mb-3 mb-md-0 me-md-auto link-dark text-decoration-none">
        <img src="{% static 'img/logo.png' %}" width="40" height="40" alt="">
    </a>

    <ul class="nav col-md-4 justify-content-end">
        <li class="nav-item"><a href="https://www.ksu.edu.cn/" class="nav-link px-2 text-muted">喀什大学官网</a></li>
        <li class="nav-item"><a href="https://tsg.ksu.edu.cn/" class="nav-link px-2 text-muted">喀什大学图书馆</a></li>


        <li class="nav-item"><a href="http://218.195.192.118/jwglxt/xtgl/login_slogin.html"
                                class="nav-link px-2 text-muted">教务管理系统</a></li>
        <li class="nav-item"><a href="/admin/" class="nav-link px-2 text-muted">我是管理员</a></li>

    </ul>
</footer>

<script src="{% static 'bootsrap/js/bootstrap.bundle.min.js' %}"></script>
</body>
</html>